import pandas as pd
import csv
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = 'SimHei'
iris = pd.read_csv('iris.csv')
for x in [0,1]:
    if x == 0:
        s = '花萼'
    else:
        s = '花瓣'
    plt.show()
    plt.title('鸢尾花'+ s + '长度-宽度散点图', fontsize=18)
    plt.xlabel(s + '长度', fontsize=16)
    plt.ylabel(s + '宽度', fontsize=16)
    for k,v in {'setosa':'^', 'versicolor':'v', 'virginica':'o'}.items():
        d = iris[iris.Species==k]
        plt.scatter(d.iloc[:, 2*x], d.iloc[:, 2*x+1], marker=v, s=120, label=k)
    plt.legend(fontsize=14)